package com.example.nfcaccesssystem;

import java.io.Serializable;

public class User implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int id;
	private String name;
	private String accessId;
	
	public User(String name) {
		this.name = name;
	}
	
	public User(String name, int id, String accessId){
		this.name = name;
		this.id = id;
		this.accessId = accessId;
	}
	
	public int getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getAccessId() {
		return accessId;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public void setAccessId(String accessId) {
		this.accessId = accessId;
	}
	
	@Override
	public String toString() {
		return this.id + ". " + this.name;
	}
	
	@Override
	public boolean equals(Object other) {
        return this.id == ((User)other).id && this.name == ((User)other).name;
    }
}
